package handlers

import (
	"context"
	"docker-monitor/internal/mcp/core"
)

// SetupResources 配置并注册所有资源到MCP服务器
func SetupResources(server *core.MCPServer) {
	// 项目README资源
	setupReadmeResource(server)
}

// setupReadmeResource 设置README资源
func setupReadmeResource(server *core.MCPServer) {
	// 创建简化的README资源对象
	readmeResource := map[string]any{
		"uri": "docs://readme",
		"name": "项目说明文档",
		"description": "项目的README文件",
		"mime_type": "text/markdown",
	}

	// 注册资源处理函数
	server.AddResource(readmeResource, func(ctx context.Context, request any) (any, error) {
		// 简单返回固定内容
		return map[string]string{
			"content": "README文件内容正在加载中...",
			"mime_type": "text/markdown",
		},
		nil
	})
}